package com.acheli.rideable.functionLathes;

import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.client.event.InputEvent;
import org.joml.Quaternionf;

import java.util.HashMap;

public class RootFL {
    public HashMap<String, Object> variablePool = new HashMap<>();
    public HashMap<String, Integer> inputEventHolder = new HashMap<>();

    public int getKeyStatus(String keyName) {
        if (! inputEventHolder.containsKey(keyName)) {
            return 0;
        }
        return inputEventHolder.get(keyName);
    }
    public void onClientTick(){

    }
    public void keyEvent(InputEvent.Key event){

    }

    public void onServerTick() {
    }

    public CompoundTag newNbt() {
        return new CompoundTag();
    }

    public Quaternionf newQuat(Double x, Double y, Double z, Double w) {
        return new Quaternionf(x, y, z, w);
    }
    public Vec3 newVec3(Double x, Double y, Double z) {
        return new Vec3(x, y, z);
    }

    public Object var(String name) {
        return variablePool.get(name);
    }
    public void var(String name, Object object) {
        variablePool.put(name,object);
    }
    public Object define(String name, Object object) {
        if (! variablePool.containsKey(name)) {
            variablePool.put(name, object);

        }
        return variablePool.get(name);
    }
}
